package com.zhm.spring.ws.controller;

import com.zhm.spring.ws.utils.Constants;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;

/**
 * Created by zhm on 2015/7/13.
 */
@Controller
public class HomeController {
    @RequestMapping(value="/webchat/{username}")
    public String webchat(@PathVariable String username,HttpSession session){
        session.setAttribute(Constants.SESSION_USERNAME.value(),username);
        return "websocket";
    }
}
